package edu.ar.bases.dvdstore.domainmodel.repositories;

import java.util.Collection;

import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import edu.ar.bases.dvdstore.domainmodel.entities.Provincia;
import edu.ar.bases.dvdstore.domainmodel.repositories.interfaces.IProvinciaRepository;

public class ProvinciaRepository extends HibernateDaoSupport implements IProvinciaRepository {
	
	public ProvinciaRepository() {
		super();
	}

	
	public Collection<Provincia> findAll()
	{
		return this.getHibernateTemplate().loadAll(Provincia.class);
	}

	
	public void save(Provincia entity)
	{
		this.getHibernateTemplate().save(entity);
	}
	
	
	public Provincia findById(Integer provID)
	{
		return (Provincia)this.getHibernateTemplate().get(Provincia.class, provID);
	}
}
